<script lang="ts" setup>
import type { PhaseType } from '@/types/micro-scene';
defineProps<{
  phase?: PhaseType,
  index?: number
}>()

// 数字转汉字的映射函数
const numberToChineseMap = {
  1: '一',
  2: '二',
  3: '三',
  4: '四',
  5: '五',
  6: '六',
  7: '七',
  8: '八',
  9: '九',
  10: '十',
  11: '十一',
  12: '十二',
  13: '十三',
} as const;

const getChineseNumber = (num: number) => {
  return numberToChineseMap[num as keyof typeof numberToChineseMap] || num.toString();
};
</script>

<template>
  <div class="flex items-center justify-start">
    <div class="text-xl font-bold">
      阶段{{ getChineseNumber(index!) }}
    </div>
    <div class="ml-6 text-xl font-bold">
      {{ phase?.phaseTitle ?? '未定义阶段名称' }}
    </div>
  </div>
</template>

<style lang="scss" scoped>

</style>
